/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fgv.erp.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author adao
 */
@Entity
@Table(name = "Pagina")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pagina.findAll", query = "SELECT p FROM Pagina p"),
    @NamedQuery(name = "Pagina.findByPagina", query = "SELECT p FROM Pagina p WHERE p.pagina = :pagina"),
    @NamedQuery(name = "Pagina.findByBannerPrincipal", query = "SELECT p FROM Pagina p WHERE p.bannerPrincipal = :bannerPrincipal"),
    @NamedQuery(name = "Pagina.findByCabecalho", query = "SELECT p FROM Pagina p WHERE p.cabecalho = :cabecalho"),
    @NamedQuery(name = "Pagina.findByImagem", query = "SELECT p FROM Pagina p WHERE p.imagem = :imagem"),
    @NamedQuery(name = "Pagina.findByLabelBotao", query = "SELECT p FROM Pagina p WHERE p.labelBotao = :labelBotao"),
    @NamedQuery(name = "Pagina.findByPalavrasChaves", query = "SELECT p FROM Pagina p WHERE p.palavrasChaves = :palavrasChaves")})
public class Pagina implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pagina")
    private Long pagina;
    @Column(name = "bannerPrincipal")
    private Boolean bannerPrincipal;
    @Size(max = 255)
    @Column(name = "cabecalho")
    private String cabecalho;
    @Lob
    @Size(max = 65535)
    @Column(name = "conteudo")
    private String conteudo;
    @Size(max = 255)
    @Column(name = "imagem")
    private String imagem;
    @Size(max = 255)
    @Column(name = "labelBotao")
    private String labelBotao;
    @Size(max = 255)
    @Column(name = "palavrasChaves")
    private String palavrasChaves;

    public Pagina() {
    }

    public Pagina(Long pagina) {
        this.pagina = pagina;
    }

    public Long getPagina() {
        return pagina;
    }

    public void setPagina(Long pagina) {
        this.pagina = pagina;
    }

    public Boolean getBannerPrincipal() {
        return bannerPrincipal;
    }

    public void setBannerPrincipal(Boolean bannerPrincipal) {
        this.bannerPrincipal = bannerPrincipal;
    }

    public String getCabecalho() {
        return cabecalho;
    }

    public void setCabecalho(String cabecalho) {
        this.cabecalho = cabecalho;
    }

    public String getConteudo() {
        return conteudo;
    }

    public void setConteudo(String conteudo) {
        this.conteudo = conteudo;
    }

    public String getImagem() {
        return imagem;
    }

    public void setImagem(String imagem) {
        this.imagem = imagem;
    }

    public String getLabelBotao() {
        return labelBotao;
    }

    public void setLabelBotao(String labelBotao) {
        this.labelBotao = labelBotao;
    }

    public String getPalavrasChaves() {
        return palavrasChaves;
    }

    public void setPalavrasChaves(String palavrasChaves) {
        this.palavrasChaves = palavrasChaves;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pagina != null ? pagina.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pagina)) {
            return false;
        }
        Pagina other = (Pagina) object;
        if ((this.pagina == null && other.pagina != null) || (this.pagina != null && !this.pagina.equals(other.pagina))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.fgv.erp.modelo.Pagina[ pagina=" + pagina + " ]";
    }
    
}
